package com.candy.control;


import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class HelloController implements Controller {

    @Override
    public ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
        System.out.println("接收到前端传递过来的请求...");
//        创建视图模型
        ModelAndView mv=new ModelAndView();
//        设置视图的名字
//        完整路径应该是：WEB-INF\pages\welcome.jsp
        mv.setViewName("welcome");
        return mv;
    }
}
